package com.reader.core.entity;

import com.reader.core.validator.group.AddGroup;
import com.reader.core.validator.group.UpdateGroup;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 请求对象基类
 */
public class BaseRequest implements Serializable {
    /**
     * 当前页数
     */
    @NotNull(message="当前页码不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private Integer currentPage;
    /**
     * 每页数据条数
     */
    @NotNull(message="每页数据条数不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private Integer size;

    public Integer getCurrentPage() {
        return currentPage;
    }

    public void setCurrentPage(Integer currentPage) {
        this.currentPage = currentPage;
    }

    public Integer getSize() {
        return size;
    }

    public void setSize(Integer size) {
        this.size = size;
    }
}
